package com.company._0class引入;

import java.io.FileInputStream;
import java.lang.reflect.Method;
import java.util.Properties;

public class Main {

    public static void main(String[] args) throws Exception {
        // 读取配置
        Properties p=new Properties();
        p.load(new FileInputStream("round1000.txt"));
        String name="com.company._0class引入."+p.getProperty("name");
        System.out.println(name);

//        根据配置创建官咖
        Monster m = null;
//        if("SmallMonster".equals(name)){
//            m=new SmallMonster();
//        }
//        else if("SuperMonster".equals(name)){
//            m=new SuperMonster();
//        }
//        else if("BossMonster".equals(name)){
//            m=new BossMonster();
//        }
//        m.kill();

        Class c= Class.forName(name);
        m=(Monster)c.getDeclaredConstructor().newInstance();
        m.kill();
    }
}
